#ifndef _INSERTSORT_H
#define _INSERTSORT_H

#include <iostream>

template <typename T>
void InsertSort(T seq[],int n)
{
    for(int i=1;i<n;i++)
    {
        T key=seq[i];
        int j=i-1;
        while(j>=0 && seq[j]>key)
        {
            seq[j+1]=seq[j];
            j--;
        }
        seq[j+1]=key;
    }
}


#endif